package net.mengkang.controller;

import net.mengkang.RequestMapping;
import net.mengkang.RequestMethod;
import net.mengkang.response.DataResult;
import net.mengkang.utils.TraceUtil;

public class IndexController {

    @RequestMapping(value = "/abc", method = RequestMethod.GET)
    public DataResult<String> index() {
        System.out.printf("time:%s traceId:%s index\n", System.currentTimeMillis(), TraceUtil.get());
        return DataResult.success("hello world");
    }

    /**
     * 没注解不会被扫描注册到路由表
     *
     * @return
     */
    public String test() {
        return "test";
    }
}
